﻿<s:SurfaceWindow x:Class="navigation.SurfaceWindow1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008"
    xmlns:local="clr-namespace:navigation"   
    xmlns:content="clr-namespace:navigation.Contents"
    xmlns:control="clr-namespace:navigation.Controls"
    s:TouchVisualizer.VisualizationColor1="#FF40B1CE"
    s:TouchVisualizer.VisualizationColor2="#FF40B1CE"
    s:TouchVisualizer.VisualizationColor3="#FF40B1CE"
    Title="navigation" WindowState="Maximized" WindowStyle="None" 
    >
    <s:SurfaceWindow.Resources>
        <Storyboard x:Key="ShowActivated">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="_layoutRoot">
                <SplineDoubleKeyFrame KeyTime="0:0:1" Value="1" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <ImageBrush x:Key="HorizontalBackground" Stretch="Uniform"  ImageSource="/Resources/Mac Style Background.jpg"/>
    </s:SurfaceWindow.Resources>

    <Grid x:Name="_layoutRoot" Background="{StaticResource HorizontalBackground}">
        <Grid.RowDefinitions>
            <RowDefinition Height="0.9*"/>
            <RowDefinition Height="0.08*"/>
            <RowDefinition Height="0.02*"/>
        </Grid.RowDefinitions>

        <!--<s:TagVisualizer Name="Visualizer" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
            <s:TagVisualizer.Definitions>
                <s:TagVisualizationDefinition Value="0xC1" TagRemovedBehavior="Fade" Source="/Tags/MainMenuTag.xaml" PhysicalCenterOffsetFromTag="0,0" LostTagTimeout="1000"/>
            </s:TagVisualizer.Definitions>-->

            <local:NavigationPanel Grid.Row="0" Orientation="Horizontal" Background="Transparent"
					x:Name="NavigationPanel"
					Height="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Grid, AncestorLevel=1}, Path=ActualHeight}" 
					HorizontalAlignment="Left"
					VerticalAlignment="Top"
                    TouchDown="NavigationPanel_TouchDown"
                    TouchMove="NavigationPanel_TouchMove"
                    TouchUp="NavigationPanel_TouchUp">

                <Grid Name="Page1" Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorLevel=1,AncestorType={x:Type Window}}, Path=ActualWidth }" MaxWidth="1920"
				        Height="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorLevel=1, AncestorType={x:Type local:NavigationPanel}}, Path=ActualHeight}"
                        Background="Transparent">
                    <content:BacklogScreen HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ProductBacklogItems="{Binding ProductBacklogItems}" SprintBacklogItems="{Binding SprintBacklogItems}"/>
                </Grid>

                <Grid Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorLevel=1,AncestorType={x:Type Window}}, Path=ActualWidth }" MaxWidth="1920"
				  Height="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorLevel=1, AncestorType={x:Type local:NavigationPanel}}, Path=ActualHeight}"
                  Background="Transparent">
                    <content:ScrumBoardScreen ScrumBoardItems="{Binding SprintBacklogItems}"/>
                </Grid>

                <Grid Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorLevel=1,AncestorType={x:Type Window}}, Path=ActualWidth }" MaxWidth="1920"
				  Height="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorLevel=1, AncestorType={x:Type local:NavigationPanel}}, Path=ActualHeight}"
				  Background="Purple" >
                    <TextBlock FontSize="36">Page3</TextBlock>
                </Grid>
            </local:NavigationPanel>

        <Grid Grid.Row="1" Background="#4C000000">
            <control:SlideSwitch x:Name="SlideSwitch" Width="600" Margin="0,15,0,0" HorizontalAlignment="Center" PreviewTouchUp="SlideSwitch_PreviewTouchDown"/>
        </Grid>

        <!--</s:TagVisualizer>-->
        
    </Grid>
</s:SurfaceWindow>
